﻿using System.ComponentModel.DataAnnotations;
using SSB.Web.Mvc;

namespace NOSDC.Models
{
    public class ContactUs
    {
        [Required]
        public string Subject { get; set; }
        
        [Required]
        public string Name { get; set; }
        
        [Required]
        [RegularExpression("^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$", ErrorMessage = "Please enter a valid email")]
        public string From { get; set; }
        
        [Required]
        public string Message { get; set; }

        [Required]
        [ValidateMvcCaptcha(ErrorMessage="Captcha is not valid")]
        public string Captcha { get; set; }
    }
}